home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
serien
/
purity
/
nr.51
/
xpk-kp
/
unit_xpksub.p
< prev
next >
Wrap
Text File
|
1995-08-27
|
4KB
|
109 lines
{ Unit: XpkSub
~~~~~
Comment: Belongs to Xpk-Interface. Look there for ©, info etc.
~~~~~~~~ }
{************************************************************************}
Unit XpkSub;
INTERFACE
Uses Xpk;
{**************************************************************************
*
* Sublibs return this structure to xpkmaster when asked nicely
*
*}
type p_XpkInfo = ^XpkInfo;
XpkInfo = record
xi_XpkInfoVersion : word; {Version number of this structure }
xi_LibVersion : word; {The version of this sublibrary }
xi_MasterVersion : word; {The required master lib version }
xi_ModesVersion : word; {Longword align }
xi_Name : str; {Brief name of the packer }
xi_LongName : str; {Full name of the packer }
xi_Description : str; {One line description of packer }
xi_ID : long; {ID the packer goes by (XPK format)}
xi_Flags : long; {Defined below }
xi_MaxPkInChunk : long; {Max input chunk size for packing }
xi_MinPkInChunk : long; {Min input chunk size for packing }
xi_DefPkInChunk : long; {Default packing chunk size }
xi_PackMsg : str; {Packing message, present tense }
xi_UnpackMsg : str; {Unpacking message, present tense }
xi_PackedMsg : str; {Packing message, past tense }
xi_UnpackedMsg : str; {Unpacking message, past tense }
xi_DefMode : word; {Default mode number }
xi_Pad : word; {for future use }
xi_Modes : ptr; {Array of compression modes }
xi_Reserved : array[0..5] of long; {Future expansion - set to zero }
end;
{Defines for XpkInfo.Flags: see xpk.i, XPKIF_xxxxx}
{**************************************************************************
*
* The XpkSubParams structure
*
*}
type p_XpkSubParams = ^XpkSubParams;
XpkSubParams = record
xsp_InBuf : ptr; {The input data }
xsp_InLen : word; {The number of bytes to pack }
xsp_OutBuf : ptr; {The output buffer }
xsp_OutBufLen : long; {The length of the output buf}
xsp_OutLen : long; {Number of bytes written }
xsp_Flags : long; {Flags for master/sub comm. }
xsp_Number : long; {The number of this chunk }
xsp_Mode : long; {The packing mode to use }
xsp_Password : str; {The password to use }
xsp_Arg : array[0..3] of long; {Reserved; don't use }
xsp_Sub : array[0..3] of long; {Sublib private data }
end;
const
XSF_STEPDOWN = 1; {May reduce pack eff. to save mem }
XSF_PREVCHUNK = 2; {Previous chunk available on unpack}
var XpkSubBase : ptr;
Library XpkSubBase:
-30 : function XpksPackerInfo:p_XpkInfo;
-36 : function XpksPackChunk(a0:p_XpkSubParams):long;
-42 : procedure XpksPackFree(a0:p_XpkSubParams);
-48 : procedure XpksPackReset(a0:p_XpkSubParams);
-54 : function XpksUnpackChunk(a0:p_XpkSubParams):long;
-60 : procedure XpksUnpackFree(a0:p_XpkSubParams);
end;
IMPLEMENTATION
end.